package com.cy.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Description: 添加描述
 * date: 2021/3/19 0019 17:08
 *
 * @author Mr.xiaoshi
 * @since JDK 1.8
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RestResult implements Serializable {
    private static final long serialVersionUID =
            -3616020572486178359L;
    private Integer state=1;
    private String message="Ok";
    private Object data;

    public RestResult(String message){
        this.message=message;
    }
    public RestResult(Object data){
        this.data=data;
    }
    public RestResult(Throwable e){
        this.state=0;
        this.message=e.getMessage();
    }

}
